package com.longxiao.mapper;

import com.longxiao.entity.ClassroomStu;

import java.util.List;
import java.util.Map;

public interface ClassroomStuMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ClassroomStu record);

    int insertSelective(ClassroomStu record);

    ClassroomStu selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ClassroomStu record);

    int updateByPrimaryKey(ClassroomStu record);

    /**
     * 房间号查询学生列表
     * @param roomId
     * @return
     */
    List<ClassroomStu> selectStuListByRoomId(int roomId);

    /**
     * 房间是否包含学生ID
     * @param param
     * @return
     */
    int containsStuId(Map<String, Object> param);

    /**
     * 更新学生状态为取消
     * @param param
     * @return
     */
    int updateStuCancel(Map<String, Object> param);

    /**
     * 学生是否匹配成功
     * @param param
     * @return
     */
    int isMatched(Map<String, Object> param);

    /**
     * 查询老师所有学生个数
     * @param tchId
     * @return
     */
    int countStu(String tchId);
}